package com.zzr.demo.redis.service;

/**
 * @author: xiaomi
 * @date: 2021/10/8
 * @description:
 */
public interface SessionService {
    String TOKEN_HASH_KEY = "session::token";
    String TOKEN_EXPIRE_HASH_KEY = "session::expire";

    String SESSION_NOT_LOGIN = "用户未登录";
    String SESSION_EXPIRE = "会话过期";
    String SESSION_TOKEN_INCORRECT = "Token 不正确";
    String SESSION_TOKEN_CORRECT = "Token 正确！";

    String createSession(String userId);

    String validate(String userId, String token);

    boolean destroy(String userId);
}
